#ifndef _BASIC_H
#define _BASIC_H

#include <Arduino.h>

#define SCL D5
#define SDA D6
#define CHARGING_ATTACH_PIN D7
#define LED_PIN D4

#define GO_FORWARD 1
#define GO_BACKWARD 2
#define GO_RIGHT 3
#define GO_LEFT 4
#define STOP 0
#define WAITING 5


#define LED_COUNT 10
#define DELAY_AND_THEN_SLEEP 10*1000

// RUNING PARAMETER
uint8_t run_code = 0; // 0标志着停止
unsigned long current_time;
unsigned long last_active_time;
bool isMotionReset = true;
bool isSleep=false;

//BASIC FUNCTION
bool isCharging(){
    return 0 == digitalRead(CHARGING_ATTACH_PIN);
}

#endif